<?php
//命名空间
namespace Admin\Model;
use \Frame\Libs\BaseModel;

final class IndexModel extends BaseModel{
	
	public function rowCountActivity(){
		$sql = "SELECT activity_id FROM love_activity";
		return $this->pdo->rowCount($sql);
	}
	
	public function rowCountUser(){
		$sql = "SELECT uid FROM love_user";
		return $this->pdo->rowCount($sql);
	}
	
	public function countMoney(){
		$sql = "SELECT money FROM love_common";
		return $this->pdo->fetchOne($sql);
	}
	
	public function countBook(){
		$sql = "SELECT sum(book_inventory) FROM love_book";
		return $this->pdo->fetchAll($sql);
	}
}
?>